package com.shenyi.shop.service;

import com.shenyi.shop.api.ICouponGoodsService;
import com.shenyi.shop.dao.CouponGoodsMapper;
import com.shenyi.shop.entity.CouponGoodsDO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * @author richard.fan
 * @version 1.0
 * @date 2018/11/05
 * @desc 优惠券'
 * @see
 * @since 1.0
 */
@Service
public class CouponGoodsServiceImpl implements ICouponGoodsService {

    @Autowired
    private CouponGoodsMapper couponGoodsMapper;

    @Override
    public CouponGoodsDO queryObject(Integer id) {
        return couponGoodsMapper.queryObject(id);
    }

    @Override
    public List<CouponGoodsDO> queryList(Map<String, Object> map) {
        return couponGoodsMapper.queryList(map);
    }

    @Override
    public int queryTotal(Map<String, Object> map) {
        return couponGoodsMapper.queryTotal(map);
    }

    @Override
    public int save(CouponGoodsDO couponGoods) {
        return couponGoodsMapper.save(couponGoods);
    }

    @Override
    public int update(CouponGoodsDO couponGoods) {
        return couponGoodsMapper.update(couponGoods);
    }

    @Override
    public int delete(Integer id) {
        return couponGoodsMapper.delete(id);
    }

    @Override
    public int deleteBatch(Integer[]ids) {
        return couponGoodsMapper.deleteBatch(ids);
    }
}
